package com.foo.designpattern.state.state2;

/**
 * com.foo.designpattern.state
 * Created with IntelliJ IDEA.
 * Created by jiang on 2016-06-08 15:25.
 *
 * @Description
 */

public class NormalVoteState implements VoteState {
    @Override
    public void vote(String user, String voteItem, VoteManager manager) {
        manager.getMapVote().put(user, voteItem);
        System.out.println("投票成功！");
        // 在状态的处理类中进行状态的维护和转换
        manager.getMapState().put(user, new RepeatVoteState());
    }
}
